//
//  HELCourseCommentCell.m
//  sanda
//
//  Created by wsj2015 on 16/7/12.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "HELCourseCommentCell.h"
#import "UIImageView+UIActivityIndicatorForSDWebImage.h"
#import "NSDate+FormatDateUseful.h"
@implementation HELCourseCommentCell

- (void)awakeFromNib {
    // Initialization code
    self.lineView.backgroundColor= kBorderColor;
    self.lineHeigh.constant = kOnePX;
    wsj_cornerRadius(self.iconImageView, 25);
    
    
}
- (IBAction)praiseLabel:(id)sender {
    if (self.praiseBlock) {
        self.praiseBlock();
    }
}
- (IBAction)unprasieBtn:(id)sender {
    if (self.unPraiseBlock) {
        self.unPraiseBlock();
    }
}
- (void)setModel:(HELCourseCommentModel *)model{
    
    [self.iconImageView setImageWithURL:[NSURL URLWithString:model.photoShowMap.mini] placeholderImage:[UIImage imageNamed:@"headPhoto"] usingActivityIndicatorStyle:1];
    self.nameLabel.text = model.trueName;
    self.cotentLabel.text = model.content;
 
    self.titleLabel.text = [NSDate formatTime:[model.createTime longLongValue]];
    [self.praiseBtn setTitle:[NSString stringWithFormat:@"%@",model.goodNum] forState:UIControlStateNormal];
    [self.unpraiseBtn setTitle:[NSString stringWithFormat:@"%@",model.badNum] forState:UIControlStateNormal];
  
}
@end
